home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2764 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1014 b 

  1. Path: fohnix.metronet.com!not-for-mail
  2. From: milam@fohnix.metronet.com (Stan Milam)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: File Size!
  5. Date: 23 Jan 1996 15:39:14 -0600
  6. Organization: Texas Metronet, Inc  (login info (214/488-2590 - 817/571-0400))
  7. Message-ID: <4e3ki2$qkj@fohnix.metronet.com>
  8. References: <4e11ph$733@hammerhead.dadd.ti.com>
  9. NNTP-Posting-Host: fohnix.metronet.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Sudheer Vemulapalli (sudheer@dadd.ti.com) wrote:
  13. : Hello Netters,
  14.  
  15. : Is there a simple way to find the exact size of a file. I would like to know of
  16. : a way to do it other than using ls -l and getting the size field from the
  17. : output. If there is a UNIX system call or somefunction that returns the file
  18. : size please let me know.
  19.  
  20. : Thankx in advance.
  21.  
  22. : -- 
  23. : Sudheer K. Vemulapalli
  24.  
  25. Look at the stat() system call.  This will give you more inforation about a
  26. file than you will know what do with.  This is what the ls command uses to get
  27. all the file information it displays.
  28.  
  29. Regards, Stan Milam.
  30.  
  31.